﻿@extends('home.layout.layout')
@section('con')
<style type="text/css">
  #header_top{
    margin-top:-16px;
  }
  #header_search_input{
    height:38px;
  }
</style>
<!--首屏350px高轮播广告位 && 首页新用户大弹窗自定义广告位 -->
<div class='site_body'>
  <div id='site_switch' class='ecope_switchable site_switch'>
    <div class='sc_container'>
      <div id="iframe-wrap" class="box_img">
          <ul id="iframe">
          <?php 
          	//轮播图片
          	$car = DB::table('carousel')
          	  ->orderBy('id', 'desc')
          	  ->get();
           ?>
          @foreach($car as $k => $v)
            <li style="background: url(/uploads/{{$v->img}}) 50% 0px no-repeat;"></li>
          @endforeach
        </ul>
      </div>
    </div>
  </div>
</div>

<div class="home_top_tab" id="home_top_tab">
  <ul class="tab_menu clearfix">
    <li data-index="0" class="current">今日疯抢</li>
    <li class="" data-index="1"> 明日预告<em style="display: none;">14</em> </li>
  </ul>
  <div class="tab_wrapper">
    <!-- 今日 -->
    <div class="tab_content" id="home_top_tab_1">
      <div class="tab_box">
        <div class="home_top_ad">
          <div class="home_ad_list clearfix">
          <?php 
            $today = date('Y-m-d H:i:s',mktime(0, 0, 0,date("m"),date("d"),date("Y")));
            $tomo = date('Y-m-d H:i:s',mktime(0, 0, 0,date("m"),date("d")+1,date("Y")));
            $id = DB::table('seckill')->where('act_stop_time','<',$tomo)->where('act_start_time','>',$today)->lists('id');
            foreach($id as $v){
              $arr = DB::table('seckimg')->where('id',$v)->get();
              foreach($arr as $val){
           ?>
            <a href="{{url('/home/act/hd',['id'=>$val->id])}}" target="_blank"><img src="/uploads/{{$val->imginfo}}" border="0" /></a>
            <?php
                }
              }
            ?>
          </div>
        </div>
      </div>
    </div>
    
      <!-- 明日 -->
    <div class="tab_content" id="home_top_tab_2" style="display:none">
        <div class="tab_box">
            <div class="home_top_ad">
              <div class="home_ad_list clearfix">
              <?php 
                $todays = date('Y-m-d H:i:s',mktime(0, 0, 0,date("m"),date("d")+1,date("Y")));
                $tomos = date('Y-m-d H:i:s',mktime(0, 0, 0,date("m"),date("d")+2,date("Y")));
                $id = DB::table('seckill')->where('act_stop_time','<',$tomos)->where('act_start_time','>',$todays)->lists('id');
                foreach($id as $v){
                  $arr = DB::table('seckimg')->where('id',$v)->get();
                  foreach($arr as $val){
               ?>
                <a href="{{url('/home/act/hd',['id'=>$val->id])}}" target="_blank"><img src="/uploads/{{$val->imginfo}}" border="0" /></a>
                <?php
                    }
                  }
                ?>
              </div>
            </div>
        </div>

    </div>

  </div>
</div>

<div style="height:80px;width:100%;background:#fff url(/homecss/Images/54101_1920_80_001-web.jpg) no-repeat top center;"></div>
<!-- 每日必看\今明日爆款\今日推荐品牌团-->
<div class="layout_1090 today_later_main">
  <h2 class="floor_item_title floor_must_see" id="mustsee"></h2>
  <!-- 今明日爆款上方广告位 -->
  <!-- 爆款时间轴 -->
  <!-- 今明日爆款 -->
  <div class="ecope_tab today_later_content" id="today_later_tab">
    <div class="tab_wrapper">
      <div class="tab_content today_tab_wrapper" id="today_tab_wrapper">
        <!--今日爆款-->
        <div class="tab_box" id="today_deal_end">
          <?php
            $cate = DB::table('seckillglobal')
              ->where('mustsee','1')
              ->orderBy('id','desc')
              ->paginate(10);

           ?>
          @foreach($cate as $k => $v)
          <?php 
            $str = substr($v->description,0,210);
           ?>
          <div class="today_tab_content" data-hashid="ht161031p2288965t2"> <a href="{{url('/globalinfo/index',['id'=>$v->id])}}" target="_blank" class="today_tab_link"> <img original="" border="0" class="all_cart_img" src="{{$v->img}}"></a>
            <div class="deals_tags"> <span class="tags_list tags_haitao">海淘</span> </div>
            <div class="products_detail">
              <div class="products_have_time"></div>
              <a href="{{url('/globalinfo/index',['id'=>$v->id])}}" target="_blank" class="product_short_title"> @if($v->offcial == 0)<em>【官方授权】</em>@endif <?php echo $str; ?></a>
              <div class="product_price"> <a target="_blank" href="{{url('/globalinfo/index',['id'=>$v->id])}}" class="goto_btn goto_see">去看看</a> <span class="now_price"><em>¥</em>{{$v->price}}</span>
                <div class="price_wrap">
                  <div class="icon_wrap"> </div>
                  <span class="pass_price"><del>¥{{$v->discount}}</del></span> </div>
              </div>
              <div class="global_sure_tag"> <span class="g_tag"><img src="/homecss/Picture/029_big.jpg"></span> <span class="wish_like yahei fr"><em>{{$v->salecount}}</em>人已经购买</span> </div>
            </div>
          </div>
          @endforeach
        </div>
        <!--今日爆款 end-->
      </div>
    </div>
  </div>
</div>

<!-- 今日上新-->
<div class="layout_1090 today_new_deal">
  <div class="today_deal_tit">
    <h2 class="floor_head" id='today_deals'>今日上新</h2>
    <p class="today_deals_tip">每日十点上新</p>
  </div>
  <div class="today_new_productlist">
    <ul class="today_new_ul clearfix" id="today_new_ul">
      <?php
        $jinri = DB::table('seckillglobal')
          ->where('mustsee','0')
          ->orderBy('id', 'desc')
          ->paginate(30);
       ?>
      @foreach($jinri as $k => $v)
      <li class="newdeal_box" pid="1967072" bid="458" cid="37" pos="18" data-hashid="d161108p1967072zc">
        <div class="img_box"><a class="img_box_href" target="_blank" href="{{url('/globalinfo/index',['id'=>$v->id])}}"><img alt="【139减50不封顶】卡姿兰清新自然套装，唤醒你沉睡的妆面！" src="{{$v->img}}" style="width: 862px;height: 345px;margin-left: -238px;" class="img_400 all_cart_img">
          <div class="commit_new" style="display: block;">
            <div class="commit_new_box">新品上线，赶快来试试吧！</div>
          </div>
          </a>
          <div class="deals_tags"></div>
          <div class="add_cart_box all_cart_wrap" style="display: block;"><a href="javascript:;" class="add_cart all_cart">加入购物车</a></div>
        </div>
        <a target="_blank" href="{{url('/globalinfo/index',['id'=>$v->id])}}">
        <div class="today_new_detail">
          <p class="title">@if($v->offcial == 0)<span class="pink">【官方授权】</span>@endif{{$v->description}}</p>
          <div class="intro_box">
            <div class="price_box"><em>¥</em><span class="pnum">{{$v->price}}</span><span class="mnum">¥{{$v->discount}}</span></div>
            <div class="numtimer_box">
              <!-- <div class="time_box" diff="265331"><em>03</em>天<em>01</em>时<em>33</em>分<em>34</em>秒</div>
              <div class="num_box">销量: <span class="buy_num">4483</span> |</div> -->
            </div>
          </div>
        </div>
        </a>
      </li>
      @endforeach
    </ul>
  </div>
</div>

<!-- 热点预告 -->
<div class="layout_1090">
  <div class="coming-soon clearfix" id="coming-soon"> </div>
</div>

<!--  左侧飘窗-->
<div style="height: 248px; visibility: hidden;" id="home_nav_bar" class="home_nav_bar">
    <div class="home_nav_border">
        <div class="jumei_idx">聚美<br>首页</div>
        <ul class="home_nav_list">
            <li class="nav_mustsee">
                <a class="act" href="#mustsee">
                <span>每日必看</span>
                </a>
            </li>
            <li class="nav_today_deals">
                <a href="#today_deals">
                <span>上新单品</span>
                </a>
            </li>
        </ul>
    </div>
</div>
<!--  左侧飘窗 end-->
@endsection